export default ({
    namespaced: true,
    state: {
        code: '',
        _token: "",
        totalNums: "0",
        totalPages: "1",
        nowPage: "1",
        setCode: false
    },
    mutations: {
        setCode(state, str) {
            state.code = str
        },
        isSetCode(state, bool) {
            state.setCode = bool
        },
        // 设置token的值
        setToken(state, arg) {
            state._token = arg;
            // 存储到localStorage中
            localStorage.setItem("_token", arg);
        },
        setTotalNums(state, arg) {
            state.totalNums = arg;
        },
        setTotalPages(state, arg) {
            state.totalPages = arg;
        },
        setNowPage(state, arg) {
            state.nowPage = arg;
        },
        setTotal(state,arg){
            state.total=arg
        },
    },
    actions: {},
    getters: {},
    modules: {}
})